package com.huawei.cloud.phone.management.common.utils;

import com.huawei.cloud.phone.management.common.BeanFactory;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;

public class I18nUtils {

    public static String getMessage(String key, Object... params) {
        MessageSource source = BeanFactory.getBean(MessageSource.class);
        return source.getMessage(key, params, LocaleContextHolder.getLocale());
    }
}
